#pragma once
#include "Message.h"

template<class entity_type>

/*	------------------------------------------------------------------------------------
	'Tis the State class. AI characters will have a number of states associated with them.
	The states an AI character can have will be defined in "AI States.h". Each AI character
	will have a StateMachine class as a member, which will handle it's states. That is, it's 
	passing from one state to another and calling the functions it's current state performs. 
	-------------------------------------------------------------------------------------*/

class State
{
public:
	virtual ~State(){}

	/*	This will execute when the states is first entered */
	virtual void Enter(entity_type*) = 0;

	/*	This is the normal update function */
	virtual void Execute(entity_type*) = 0;

	/*	This executes right before the state is exited. */
	virtual void Exit(entity_type*) = 0;

	/*	This executes if the entity receives a message from the message
		dispatcher. This way, an AI's response to a message depends upon
		his state */

	virtual bool OnMessage(entity_type*, const Message&) = 0;
};